<#assign module="order"/>

<@override name="header">
</@override>
<@override name="body">
<div class="row">
		<div class="col-md-12">
		    <ol class="breadcrumb">
		        <li><a href="${ctx}/order/list">订单管理</a></li>
		        <li>抢单记录</li>
		        <li>当前单号： ${order.orderNumber?if_exists}</li>
		        <li><a href="${ctx}/order/list">返回</a></li>
		    </ol>
		</div>
</div>
<div class="row">
	<div class="col-xs-12">
	<div class="table-responsive">
	<div class="panel panel-primary">
		<table class="table table-hover table-striped">
			<thead>
			<tr style="font-size:14px;">
				<th>申请时间</th>
				<th>服务人员名称</th>
				<th>服务人员状态</th>
				<th>操作</th>
			</tr>
			</thead>
			<tbody>
				<#if (page.content)?? >
			  	<#list page.content as data>
				<tr>
					<td>${data.created?string('MM/dd HH:mm')}</td>
					<td>${data.driver.realname?if_exists}</td>
					<td>
						<#if data.driver.status==0>
							<span style="color:#999999">下线</span>
						<#elseif data.driver.status==1>
							<span style="color:#059405">空闲</span>
						<#elseif data.driver.status==2>
							<span style="color:#db871b">接单</span>
						<#elseif data.driver.status==3>
							<span style="color:#b40000">忙碌</span>
						</#if>
					</td>
					<td>
						<#if data.driver.status==1>
						<a href="javascript:;" data-value="${data.driver.id}" class="btn-link paidanthis">派单</a>
						</#if>
					</td>
				</tr>
				</#list>
				</#if>
			</tbody>
		</table>
		<#if page.totalElements??>
		<ul class="pagination pull-right pagination-sm">
			<@pg.pager items=page.totalElements?number maxPageItems=20 export="currentPageNumber=pageNumber" url="${ctx}/order/orderapply/${order.id}">
				<@pg.index>
					<@pg.prev>
						<li><a href="${pageUrl}">&laquo;</a></li>
					</@pg.prev>
					<@pg.pages>
						<#if  currentPageNumber == pageNumber >
							<li class="active"><a href="#">${pageNumber}</a></li>
						<#else>
							<li><a href="${pageUrl}">${pageNumber}</a></li>
						</#if>
					</@pg.pages>
					<@pg.next>
						<li><a href="${pageUrl}">&raquo;</a></li>
					</@pg.next>
				</@pg.index>
			</@pg.pager>
		</ul>
		</#if>
	</div>
	</div>
	</div>
</div>

</@override>


<@override name="footer">
	<script type="text/javascript">
		window.daijia = {
			ctx:'${ctx}',
			orderid:'${order.id}'
		};
	</script>
	<script src="${ctx}/assets/js/orderapply.js"></script>
</@override>
<@extends name="../layout.ftl"/>